package com.example.demo.mapper;

import com.example.demo.entity.Report;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 举报类型表 Mapper 接口
 * </p>
 *
 * @author Mr.Yang
 * @since 2024-06-01
 */
@Mapper
public interface ReportMapper extends BaseMapper<Report> {
    //查找所有的举报类型
    @Select("SELECT * FROM report where flag = 1")
    List<Report> selectAllReports();
    //根据举报类型id查找举报类型
    @Select("SELECT * FROM report WHERE report_id = #{report_id} AND flag = 1")
    Report selectReportById(Integer id);
}
